﻿using System.Web;
using System.Web.Optimization;

namespace MvcOa
{
    public class BundleConfig
    {
        // 有关绑定的详细信息，请访问 http://go.microsoft.com/fwlink/?LinkId=301862
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                        "~/Scripts/jquery-{version}.js"));

            // 使用要用于开发和学习的 Modernizr 的开发版本。然后，当你做好
            // 生产准备时，请使用 http://modernizr.com 上的生成工具来仅选择所需的测试。
            bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
                        "~/Scripts/modernizr-*"));

            bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
                      "~/Scripts/bootstrap.js",
                      "~/Scripts/respond.js"));

            bundles.Add(new StyleBundle("~/Content/css").Include(
                      "~/Content/bootstrap.css",
                      "~/Content/site.css"));

            bundles.Add(new ScriptBundle("~/Scripts/MvcAjax").Include(
                "~/Scripts/jquery-1.7.1.js",
                "~/Scripts/jquery.unobtrusive-ajax.js",
                "~/Scripts/jquery.validate.js",
                "~/Scripts/jquery.validate.unobtrusive.js"
                ));

            bundles.Add(new ScriptBundle("~/Scripts/EasyUiJs").Include(
                "~/Scripts/EasyUI/jquery.min.js",
                "~/Scripts/EasyUI/jquery.easyui.min.js",
                "~/Scripts/EasyUI/locale/easyui-lang-zh_CN.js",
                "~/Scripts/jquery.extention.js"
                ));

            //由于css中有图片地址，虚拟路径要与实际路径对应
            bundles.Add(new StyleBundle("~/Scripts/themes/bootstrap/easyuicss").Include(
                "~/Scripts/EasyUI/themes/bootstrap/easyui.css",
                "~/Scripts/EasyUI/themes/icon.css"
                ));
            //BundleTable.EnableOptimizations = true;
        }
    }
}
